package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        //若文件不存在也会自动创建
        FileOutputStream fos = new FileOutputStream("demo.sf");
        fos.write(1);//00000001
        fos.write(2);//00000010
        fos.write(-1);//11111111
        System.out.println("写出完毕");
        fos.close();
    }
}
